﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows.Media;

namespace RaSuperGrid.SuperGrid.Converter
{
    class ContactMultiConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string contact = System.Convert.ToString(values[0]);
            int urgency = System.Convert.ToInt32(values[1]);

            if (ContactValueConverter.IsValidContact(contact) && !UrgencyValueConverter.IsNow(urgency))
            {
                return Brushes.Black as Brush;
            }
            else
            {
                return Brushes.Red as Brush;
            }
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
